home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-30 | 2.3 KB | 124 lines | [TEXT/CWIE] |
- { AMReminderEngine.p -- application-specific data management }
- { Created 10/30/98 1:03 PM by AppMaker }
-
- { This module contains data structures to access the data in your }
- { document's file(s). The purpose is to isolate the details of the }
- { data representation into this module and to provide accessor }
- { functions for reading/writing logical pieces of the data. }
- { For your application, you will probably rewrite most of this. }
- { This module will not be regenerated by AppMaker unless you delete it. }
-
- Unit AMReminderEngine;
- Interface
-
- Uses
- Types,
- Quickdraw,
- Controls,
- Events,
- Files,
- Lists,
- Menus,
- DReminder,
- DDocData,
- TextEdit,
- AMEngine;
-
- const
- kSignature = 'XXXX';
- kFileType = 'TEXT';
-
- type
- AMReminderEngine = object (AMEngine)
-
- {data members}
-
- {methods - public}
- Procedure Initialize; Override;
-
- Function GetReminder: DReminder;
- Function GetDocData: DDocData;
-
- {methods - internal}
- Procedure InitData; Override;
- Procedure DisposeData; Override;
- Procedure ReadFile; Override;
- Procedure WriteFile; Override;
- end;
-
- {----------}
- Function NewAMReminderEngine: AMReminderEngine;
-
- {----------}
- Implementation
-
- Uses
- Globals,
- Miscellany;
-
- {----------}
- Function NewAMReminderEngine: AMReminderEngine;
- var
- engine: AMReminderEngine;
- begin
- New (engine);
- if engine <> nil then begin
- engine.Initialize;
- end;
- NewAMReminderEngine := engine;
- end;
-
- {----------}
- Procedure AMReminderEngine.Initialize;
- begin
- inherited Initialize;
-
- mFileType := kFiletype;
- mSignature := kSignature;
- end;
-
- { These are just models for your own data access functions. }
- { Replace them with ones that do something useful. }
-
- {----------}
- Function AMReminderEngine.GetReminder: DReminder;
- begin
- GetReminder := NewDReminder;
- end;
-
- {----------}
- Function AMReminderEngine.GetDocData: DDocData;
- begin
- GetDocData := NewDDocData;
- end;
-
-
- {----------}
- Procedure AMReminderEngine.InitData;
- begin
- {override to initialize your data structures}
- end;
-
- {----------}
- Procedure AMReminderEngine.DisposeData;
- begin
- {override to dispose your data structures}
- end;
-
- {----------}
- Procedure AMReminderEngine.ReadFile;
- begin
- InitData;
- mDirty := false;
- {override to read from the current file into your data structures}
- end;
-
- {----------}
- Procedure AMReminderEngine.WriteFile;
- begin
- mDirty := false;
- {override to write your data structures to the current file}
- end;
-
- end.
-